package com.boboPlanet.comm.feign;

import com.boboPlanet.comm.entity.po.FileDetailPO;
import com.boboPlanet.comm.feign.fallback.PlanetFileApiFallbackImpl;
import com.boboPlanet.comm.result.ResponseResult;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Description: TODO 星球文件操作API
 * @Author: mis_wu
 * @Date: 2023/7/11
 **/
@FeignClient(value = "${planet.base.dict.config.server}",path = "/boboPlanetBaseDictConfigDev/file",fallbackFactory = PlanetFileApiFallbackImpl.class )
@EnableFeignClients
public interface PlanetFileApi {

    @PostMapping("/saveFile")
    ResponseResult<Boolean> saveFile(@RequestBody FileDetailPO fileDetail);

    @GetMapping("/getFileByUrl")
    ResponseResult<FileDetailPO> getFileByUrl(@RequestParam String url);

    @GetMapping("/deleteFileById")
    ResponseResult<Boolean> deleteFileById(@RequestParam Long id);

}
